﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Demo/Views/Shared/ViewMasterPage1.Master"
    Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="demo-dom">
        <thead>
            <tr>
                <th>
                    ID
                </th>
                <th>
                    Company
                </th>
                <th>
                    Name
                </th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>
                    ANATR
                </td>
                <td>
                    Ana Trujillo Emparedados y helados
                </td>
                <td>
                    Ana Trujillo
                </td>
            </tr>
            <tr>
                <td>
                    ANTON
                </td>
                <td>
                    Antonio Moreno Taqueria
                </td>
                <td>
                    Antonio Moreno
                </td>
            </tr>
            <tr>
                <td>
                    AROUT
                </td>
                <td>
                    Around the Horn
                </td>
                <td>
                    Thomas Hardy
                </td>
            </tr>
            <tr>
                <td>
                    BERGS
                </td>
                <td>
                    Berglunds snabbkop
                </td>
                <td>
                    Christina Berglund
                </td>
            </tr>
        </tbody>
    </table>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("#demo-dom").wijgrid();
        });
    </script>
    <p>
        Array:</p>
    <table id="demo-array">
    </table>
    <script type="text/javascript">
        $(document).ready(function () {
            // array
            $("#demo-array").wijgrid({
                data: [
                ["ANATR", "Ana Trujillo Emparedados y helados", "Ana Trujillo"],
                ["ANTON", "Antonio Moreno Taqueria", "Antonio Moreno"],
                ["AROUT", "Around the Horn", "Thomas Hardy"],
                ["BERGS", "Berglunds snabbkop", "Christina Berglund"]
              ],
                columns: [
                 { headerText: "ID" }, { headerText: "Company" }, { headerText: "Name" }
              ]
            });
        });
    </script>
    <p>
        Hash:</p>
    <table id="demo-hash">
    </table>
    <script type="text/javascript">
        $(document).ready(function () {
            // hash
            $("#demo-hash").wijgrid({
                data: [
                { ID: "ANATR", Company: "Ana Trujillo Emparedados y helados", Name: "Ana Trujillo" },
                { ID: "ANTON", Company: "Antonio Moreno Taqueria", Name: "Antonio Moreno" },
                { ID: "AROUT", Company: "Around the Horn", Name: "Thomas Hardy" },
                { ID: "BERGS", Company: "Berglunds snabbkop", Name: "Christina Berglund" }
              ]
            });
        });
    </script>
    <p>
        Remote:</p>
    <table id="demo-remote">
    </table>
    <script type="text/javascript">
        $(document).ready(function () {
            // remote
            $("#demo-remote").wijgrid({
                data: new wijdatasource({
                    proxy: new wijhttpproxy({
                        url: "http://localhost:3182/Demo/Demo/JsonDemo",
                        dataType: "jsonp",
                        key: "id"
                    })
                })
            });
        });
    </script>
</asp:Content>
